﻿namespace Order.MicroService.Service
{
    [System.Serializable]
    public class MyException : System.Exception
    {
        public MyException() { }
        public MyException(string message) : base(message) { }
        public MyException(string message, System.Exception inner) : base(message, inner) { }
        
        public MyException(string message, int code) : base(message)
        {
            Code = code;
        }

        public MyException(string message, int code, System.Exception inner) : base(message, inner)
        {
            Code = code;
        }
        protected MyException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context) : base(info, context) { }

        public int Code { get; }
    }
}
